package com.fametal.ui.activity;

import android.app.ActivityGroup;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;

import com.fametal.R;
import com.fametal.ui.service.QTService;
import com.fametal.ui.widget.CustomTabHost;

public class MainControlActivity extends ActivityGroup {
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.main_control);
        
        Intent intent = new Intent(this, QTService.class);
        startService(intent);
        
        CustomTabHost tabHost = (CustomTabHost) findViewById(R.id.tabhost);
        tabHost.setup(getLocalActivityManager());
        
        tabHost.addTab(tabHost.newTabSpec("signal").setIndicator(getResources().getString(R.string.signal_switch))
        		.setContent(new Intent(this, SignalSwitchGroup.class)));
        tabHost.addTab(tabHost.newTabSpec("audio").setIndicator(getResources().getString(R.string.audio_control))
        		.setContent(new Intent(this, AudioControlGroup.class)));
        tabHost.addTab(tabHost.newTabSpec("dvd").setIndicator(getResources().getString(R.string.dvd_control))
        		.setContent(new Intent(this, DVDControlActivity.class)));
        tabHost.addTab(tabHost.newTabSpec("tv").setIndicator(getResources().getString(R.string.tv_control))
        		.setContent(new Intent(this, TVControlGroup.class)));
        tabHost.addTab(tabHost.newTabSpec("tel").setIndicator(getResources().getString(R.string.tel_control))
        		.setContent(new Intent(this, TELControlActivity.class)));
        tabHost.addTab(tabHost.newTabSpec("video").setIndicator(getResources().getString(R.string.video_control))
        		.setContent(new Intent(this, VideoControlActivity.class)));
        tabHost.addTab(tabHost.newTabSpec("exit").setIndicator(getResources().getString(R.string.exit_system))
        		.setContent(new Intent(this, SkipActivity.class)));
        
    }
    
    @Override
    public void onBackPressed() {}
}